﻿using System;

public class Printer
{
    public void PrintFirearms(Precious unit1, Precious unit2)
    {
        Console.WriteLine("Выберите основной камень (0 - первый вариант, 1 - второй вариант):\n"
                    + "Название: " + unit1.Name + " / " + unit2.Name + "\n"
                    + "Цена: " + unit1.Price + " / " + unit2.Price + "\n"
                    + "Вес: " + unit1.Weight + " / " + unit2.Weight + "\n"
                    + "Цвет: " + unit1.Color + " / " + unit2.Color + "\n"
                    + "Твердость: " + unit1.Hardness + " / " + unit2.Hardness + "\n"
                    + "Электричество: " + unit1.Electricity + " / " + unit2.Electricity + "\n"
                    + "Прозрачность: " + unit1.Transparency + " / " + unit2.Transparency + "\n");
    }
    public void PrintCold_arms(Semiprecious unit1, Semiprecious unit2)
    {
        Console.WriteLine("Выберите Второй основной камень (0 - первый вариант, 1 - второй вариант):\n"
                    + "Название: " + unit1.Name + " / " + unit2.Name + "\n"
                    + "Цена: " + unit1.Price + " / " + unit2.Price + "\n"
                    + "Вес: " + unit1.Weight + " / " + unit2.Weight + "\n"
                    + "Сожержание синтетики: " + unit1.Content_of_synthetic + " / " + unit2.Content_of_synthetic + "\n"
                    + "Кол-во изломов: " + unit1.Count_of_fracture + " / " + unit2.Count_of_fracture + "\n");
    }

    public void PrintMessage(string message)
    {
        Console.WriteLine(message);
    }
}

public class Data
{
    public Precious[] main_stone;
    public Semiprecious[] minor_stone;
    public Necklace necklace;

    private PreciousCreator[] creators;
    private SemipreciousCreator creator;

    public void BindCreators()
    {
        main_stone = new Precious[4];
        minor_stone = new Semiprecious[2];
        creators = new PreciousCreator[2];
        creators[0] = new CorundumCreator();
        creators[1] = new BerylCreator();
        creator = new GemCreator();
        necklace = new Necklace();
    }

    public void BindDate()
    {
        main_stone[0] = creators[1].FactoryMethod("Изумруд", 6000, 60, "Зеленый", 988, 13, 7);
        main_stone[1] = creators[1].FactoryMethod("Аквамарин", 3000, 70, "Синий", 624, 5, 6);
        main_stone[2] = creators[0].FactoryMethod("Сапфир", 3500, 30, "Синий", 1065, 18, 1);
        main_stone[3] = creators[0].FactoryMethod("Рубин", 1500, 16, "Синий", 1500, 0, 22);
        minor_stone[0] = creator.FactoryMethod("Кварц", 30, 1500, 16, 100);
        minor_stone[1] = creator.FactoryMethod("Яспер", 500, 120, 60, 10);
    }
}

public class Dialog
{
    public void dialog(Data data, Printer print)
    {
        data.necklace = new Necklace();
        print.PrintMessage("Введите название ожерелья:");
        data.necklace.Name = Console.ReadLine();

        print.PrintFirearms(data.main_stone[0], data.main_stone[1]);
        if (Console.ReadLine() == "0")
        {
            data.necklace.Main_stone = data.main_stone[0];
        }
        else
        {
            data.necklace.Main_stone = data.main_stone[1];
        }

        print.PrintFirearms(data.main_stone[2], data.main_stone[3]);
        if (Console.ReadLine() == "0")
        {
            data.necklace.SecondMain_stone = data.main_stone[2];
        }
        else
        {
            data.necklace.SecondMain_stone = data.main_stone[3];
        }

        print.PrintCold_arms(data.minor_stone[0], data.minor_stone[1]);
        if (Console.ReadLine() == "0")
        {
            data.necklace.Minor_Stone = data.minor_stone[0];
        }
        else
        {
            data.necklace.Minor_Stone = data.minor_stone[1];
        }
        data.necklace.Cost();
        data.necklace.Weight();
    }
}


